package com.party.business.service.impl;

import java.util.List;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.party.business.domain.TBusinessPost;
import com.party.business.mapper.TBusinessPostMapper;
import com.party.business.service.ITBusinessPostService;
import com.party.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;


/**
 * 业务岗位Service业务层处理
 *
 * @author ruoyi
 * @date 2024-11-09
 */
@Service
public class TBusinessPostServiceImpl extends ServiceImpl<TBusinessPostMapper, TBusinessPost>  implements ITBusinessPostService
{
    @Autowired
    private TBusinessPostMapper tBusinessPostMapper;

    /**
     * 查询业务岗位
     *
     * @param id 业务岗位主键
     * @return 业务岗位
     */
    @Override
    public TBusinessPost selectTBusinessPostById(String id)
    {
        return tBusinessPostMapper.selectTBusinessPostById(id);
    }

    /**
     * 查询业务岗位列表
     *
     * @param tBusinessPost 业务岗位
     * @return 业务岗位
     */
    @Override
    public List<TBusinessPost> selectTBusinessPostList(TBusinessPost tBusinessPost)
    {
        return tBusinessPostMapper.selectTBusinessPostList(tBusinessPost);
    }

    /**
     * 新增业务岗位
     *
     * @param tBusinessPost 业务岗位
     * @return 结果
     */
    @Override
    public int insertTBusinessPost(TBusinessPost tBusinessPost)
    {
                tBusinessPost.setCreateTime(DateUtils.getNowDate());
            return tBusinessPostMapper.insertTBusinessPost(tBusinessPost);
    }

    /**
     * 修改业务岗位
     *
     * @param tBusinessPost 业务岗位
     * @return 结果
     */
    @Override
    public int updateTBusinessPost(TBusinessPost tBusinessPost)
    {
                tBusinessPost.setUpdateTime(DateUtils.getNowDate());
        return tBusinessPostMapper.updateTBusinessPost(tBusinessPost);
    }

    /**
     * 批量删除业务岗位
     *
     * @param ids 需要删除的业务岗位主键
     * @return 结果
     */
    @Override
    public int deleteTBusinessPostByIds(String[] ids)
    {
        return tBusinessPostMapper.deleteTBusinessPostByIds(ids);
    }

    /**
     * 删除业务岗位信息
     *
     * @param id 业务岗位主键
     * @return 结果
     */
    @Override
    public int deleteTBusinessPostById(String id)
    {
        return tBusinessPostMapper.deleteTBusinessPostById(id);
    }
}
